package com.zhentao.controller;

import com.zhentao.domain.SysSite;
import com.zhentao.domain.vo.Result;
import com.zhentao.service.SysSiteService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/site")
@Tag(name = "站点管理")
public class SiteController {
    @Autowired
    private SysSiteService sysSiteService;
    @PostMapping("/getsite")
    @Operation(summary = "获取站点列表")
    public Result<List<SysSite>> getSiteList(){
        return sysSiteService.getSiteList();
    }
    @PostMapping("/getSiteListByRedis")
    @Operation(summary = "在Redis中获取站点列表")
    public Result<List<SysSite>> getSiteListByRedis(String value){
        return sysSiteService.getListByRedis(value);
    }
}
